import { Component, Prop, Vue } from 'vue-property-decorator'
import router from '../../router/index'

@Component({
  template: require('./module-list.html')
})
export default class ModuleListComponent extends Vue {
  @Prop({
    default: 'Default Value'
  })
  message: string;

  dialogPushVisible: boolean = false
  dialogPublicVisible: boolean = false


  formLabelWidth = '80px'

  textarea: string = ''

  eventForm: any = {
    name: '',
    region: '',
    date1: '',
    date2: '',
    stockType: '',
    type: '',
    public: false,
    price: '',
    free: true,
    resource: '',
    desc: '',
    list: []
  }

  form: any = {
    name: '',
    region: '',
    date1: '',
    date2: '',
    type: [],
    public: false,
    price: '',
    free: true,
    resource: '',
    desc: ''
  }

  onAddModule () {}

  onPushEvent () {
    router.push({
      name: 'EventEdit',
      params: {
        id: '1'
      }
    })
  }

  onAddTechnical () {
    this.eventForm.list.push({
      technical: 'ma',
      value: '',
      direction: 'jincha'
    })
  }

  onSubmit () {}
}
